<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use yii\helpers\Url;
use yii\web\Session;
AppAsset::register($this);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Blog Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="./dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="./css/blog.css" rel="stylesheet">


    <script src="./js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<div class="blog-masthead">
    <div class="container">
        <nav class="blog-nav">
            <a class="blog-nav-item active" href="<?php echo Url::to(['site/index'])?>">Home</a>
            <a class="blog-nav-item" href="<?php echo Url::to(['site/news'])?>">News</a>
            <a class="blog-nav-item" href="#">More...</a>
            <?php if (Yii::$app->session->has('regname')){?>
                <a class="blog-nav-item" href="<?php echo Url::to(['site/logout'])?>" style="float: right">Exit</a>
                <a class="blog-nav-item" href="<?php echo Url::to(['user/center'])?>" style="float: right">Welcome  <?=Yii::$app->session->get("regname")?></a>
            <?php }else{?>
                <a class="blog-nav-item" href="<?php echo Url::to(['site/login'])?>" style="float: right">Login</a>
                <a class="blog-nav-item" href="<?php echo Url::to(['site/registered'])?>" style="float: right">Registered </a>
            <?php } ?>
        </nav>
    </div>
</div>

<div class="container">
    <?= Breadcrumbs::widget([
        'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
    ]) ?>
    <?= $content ?>
</div><!-- /.container -->

<div class="blog-footer">
    <p>Blog template built for <a href="#">Bootstrap</a> by <a href="#">@mdo</a>.</p>
    <p>
        <a href="#">Back to top</a>
    </p>
</div>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="./dist/js/bootstrap.min.js"></script>

</body>

<script>
    $(function () {
        $(".right").load('right.html');
    })
</script>
</html>

